package com.tenton.pojo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @Date: 2021/1/18
 * @Author: Tenton
 * @Description: 订单数据
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Orders {
  /**
   * 订单Id
   */
  private Integer id;
  /**
   * 用户Id
   */
  private Integer userId;
  /**
   * 图书名称
   */
  private String bookName;
  /**
   * 图书单价
   */
  private BigDecimal price;
  /**
   * 购买数量
   */
  private Integer num;
  /**
   * 总价
   */
  private BigDecimal totalPrice;
  /**
   * 订单总价
   */
  private BigDecimal allPrice;
  /**
   * 收货地址
   */
  private String address;
  /**
   * 下单时间
   */
  private String createTime;

  public Orders(Integer userId, String bookName, BigDecimal price, Integer num, BigDecimal totalPrice,BigDecimal allPrice, String address,String createTime) {
    this.userId = userId;
    this.bookName = bookName;
    this.price = price;
    this.num = num;
    this.totalPrice = totalPrice;
    this.allPrice = allPrice;
    this.address = address;
    //赋值当前时间
    this.createTime = createTime;
  }
}
